package AcWing周赛;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: a
 * Date: 2022-08-13
 * Time: 23:38
 */
//子数组异或和
public class Demo64_3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] array = new int[n+1];
        for(int i = 1; i <= n; i++){
            array[i] = scanner.nextInt();
        }
        long ret = 0;
        int sum = 0;
        Map<Integer, Integer> map1 = new HashMap<>();
        Map<Integer, Integer> map2 = new HashMap<>();
        map1.put(0, 1);
        for(int i = 1; i <= n; i++){
            sum ^= array[i];
            if(i % 2 == 0){
                ret += map1.getOrDefault(sum, 0);
                map1.put(sum, map1.getOrDefault(sum, 0)+1);

            }else{
                ret += map2.getOrDefault(sum, 0);
                map2.put(sum, map2.getOrDefault(sum, 0) + 1);
            }
        }
        System.out.println(ret);
    }
}
